<?php


namespace app\zhongcan\validate;


use think\Validate;

class NoticeValidate extends Validate
{
    protected $rule = [
        'title' => 'require|max:30|min:2',
        'image' => 'require',
        'author' => 'require',
        'abstract' => 'require',
        'content' => 'require'
    ];
    protected $message = [
        'title.require' => '标题不能为空',
        'title.max' => '标题不能多于30个字符',
        'title.min' => '标题不能少于2个字符',
        'author' => '作者不能为空',
    ];
    protected $scene = [
        'add' => ['title', 'author'],
        'edit' => ['title','author'],
    ];

}